/**
 * @file displaymediator.h
 * @brief
 *
 *
 *
 * @author 1823419256@qq.com
 * @version 1.0
 * @date 2011
*/

#ifndef MYBOOK_DISPLAY_DISPLAYMEDIATOR_H_
#define MYBOOK_DISPLAY_DISPLAYMEDIATOR_H_

class CChildFrame;
class CDisplayTabCtrl;
class CDisplayMdi;
class CDisplayFrame;

class CDisplayMediator
{
public:
	CDisplayMediator();

public:
	void Register(CDisplayTabCtrl* pTabCtrl);
	void Register(CDisplayMdi* pDisplayMdi);
	void Register(CDisplayFrame* pDisplayFrame);

	// TabCtrl -> Mdi
public:
	void ChangedShow(CChildFrame* pChildFrame);
	void ChangedClose(CChildFrame* pChildFrame, CChildFrame* pShow);

	// Mdi -> TabCtrl
public:
	void ChangedAddTab(CChildFrame* pChildFrame);
	void ChangedDelTab(CChildFrame* pChildFrame);
	void ChangedTitle(CChildFrame* pChildFrame, LPCTSTR lpszTitle);

	// TabCtrl -> DisplayMdi
public:
	void ChangedQuitFrame();

protected:
	CDisplayTabCtrl*	m_pTabCtrl;
	CDisplayMdi*		m_pDisplayMdi;
	CDisplayFrame*		m_pDisplayFrame;
};

#endif // MYBOOK_DISPLAY_DISPLAYMEDIATOR_H_